"use server";
import { prisma } from "@/lib/db";

export async function createUser() {
  const result = prisma.user.create({
    data: {
      name: "admin2",
      password: "admin2",
    },
  });
  return result;
}

export async function createRole() {
  try {
    const result = prisma.role.create({
      data: {
        name: "313",
        menuList: JSON.stringify([1, 3]),
      },
    });
    return result;
  } catch (err) {
    console.log(err);
  }
}
export async function updateUserRole() {
  //   const result = prisma.role.update({});
  //   return result;
}
